home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / 1svga.zip / MOUSTEST.PAS < prev    next >
Pascal/Delphi Source File  |  1994-05-25  |  1KB  |  41 lines

  1. { MOUSE.LIB Test }
  2.  
  3. uses Mouse,SVGA256,Txt;
  4.  
  5. { ─────────────── MouseTest ─────────────── }
  6. procedure MouseTest;
  7. var B,X,Y:integer;
  8.     St:string[3];
  9. begin
  10.   if MouseInstall<>-1 then begin
  11.     Writeln('Mouse driver not installed !');
  12.     Halt(1);
  13.   end;
  14.   Bar(0,0,320,200,104);
  15.   InstallFont(1,8,16,0,256,8,GetFontAddr(6)^);
  16.   PrintColor(1,80, 55,64,2,'Position X:');
  17.   PrintColor(1,80, 75,64,2,'Position Y:');
  18.   PrintColor(1,80, 95,64,2,'   Buttons:');
  19.   PrintColor(1,20,150,80,2,'Mouse Test');
  20.   PrintColor(1,20,170,80,2,'Copyright (C) 1994 Jou-Nan Chen');
  21.   PrintColor(1,180,55,24,2,'160');
  22.   PrintColor(1,180,75,24,2,'100');
  23.   MouseInit(0,0,639,199,8,8);
  24.   MouseCursor(1);
  25.   repeat
  26.     Str(MouseB,St); Bar(196,95,40,16,104); PrintColor(1,196,95,24,2,St);
  27.     if MouseMove=1 then begin
  28.       X:=MouseX shr 1;
  29.       Str(X:3,St); Bar(180,55,40,16,104); PrintColor(1,180,55,24,2,St);
  30.       Str(MouseY:3,St); Bar(180,75,40,16,104); PrintColor(1,180,75,24,2,St);
  31.     end;
  32.   until KeyPressed=1;
  33.   MouseCursor(2);
  34. end;
  35.  
  36. begin
  37.   SetMode(1);
  38.   MouseTest;
  39.   SetMode(0);
  40. end.
  41.